import request from './requests.js'
import axios from 'axios'
import {
	select_odd_detail_url
} from "./setting.js"

import {
	Toast
} from 'vant'

import {
	getLocalTime
} from "./date.js"



function get_odd_detail_(odd_id, callBack) {

	request({
		method: 'get',
		url: select_odd_detail_url,
		params: {
			odd_id: odd_id
		}
	}).then((response) => { //这里使用了ES6的语法
		// console.log(response) //请求成功返回的数据
		let res = response.data.resultBody


		callBack(res)

	}).catch((error) => {
		// console.log(response)
		console.log(error) //请求失败返回的数据
		Toast('接口请求失败，请联系管理员！')
	})


}


// async function get_odd_detail(odd_id, callBack){

// 	let res = await get_odd_detail(odd_id)

// 	callBack(res)

// }
export default get_odd_detail_
